import request from '@/utils/request'

export function listRequisition(query) {
  return request({
    url: '/warehouse-requisition/page',
    method: 'get',
    params: query
  })
}

export function executeRequisition(query) {
  return request({
    url: '/warehouse-requisition/execute',
    method: 'post',
    params:query
  })
}

export function createRequisition(data) {
  return request({
    url: '/warehouse-requisition/add',
    method: 'post',
    data
  })
}

export function readRequisition(query) {
  return request({
    url: '/warehouse-requisition/info',
    method: 'get',
    params:query
  })
}

export function updateRequisition(data) {
  return request({
    url: '/warehouse-requisition/edit',
    method: 'post',
    data
  })
}

export function deleteRequisition(query) {
  return request({
    url: '/warehouse-requisition/remove',
    method: 'post',
    params:query
  })
}

export function cancelRequisition(query) {
  return request({
    url: '/warehouse-requisition/cancel',
    method: 'post',
    params:query
  })
}
